package com.menny.android.ongoingweather;


import java.net.SocketException;
import java.net.URL;

import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import com.menny.android.ongoingweather.R;

import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class OngoingWeatherMainForm extends Activity implements OnClickListener {
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
		Button searchButton = (Button)super.findViewById(R.id.search);
		searchButton.setOnClickListener(this);
    }

	@Override
	public void onClick(View v) {
		switch(v.getId())
		{
		case R.id.search:
			onSearchClicked();
			break;
		}
	}

	private void onSearchClicked() {
		EditText cityName = (EditText)super.findViewById(R.id.city);
		
		String cityParamString = cityName.getText().toString();
	}

	

//	public void showToastMessage(int resId, boolean forShortTime)
//	{
//		CharSequence text = getResources().getText(resId);
//		showToastMessage(text, forShortTime);
//	}
//
//	private void showToastMessage(CharSequence text, boolean forShortTime) {
//		int duration = forShortTime? Toast.LENGTH_SHORT : Toast.LENGTH_LONG;
//		Log.v(DEBUG_TAG, "showToastMessage: '"+text+"'. For: "+duration);
//		Toast.makeText(this.getApplication(), text, duration).show();
//	}
}